// PrgUIThread.cpp : implementation file
//Author : Pradeep K Sahu
//Email : sahupk@yahoo.com
//Date  :29-Mar-2003
//Note   : You are free to use the code, and modify. Provided you
//         don't remove this comments. It will be great if you can provide
//		   your feedback.
////////////////////////////////////////////////////////////////////

#include "stdafx.h"
#include "jobq.h"
#include "PrgUIThread.h"
#include "PrgDlg.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CPrgUIThread

IMPLEMENT_DYNCREATE(CPrgUIThread, CWinThread)

CPrgUIThread::CPrgUIThread()
{
	this->m_ExecuterID =-1;
}

CPrgUIThread::~CPrgUIThread()
{
}

BOOL CPrgUIThread::InitInstance()
{
	// TODO:  perform and per-thread initialization here	
	while(this->m_ExecuterID < 0)
		Sleep(100);
	CPrgDlg dlg;
	dlg.m_ID = this->m_ExecuterID;


	m_pMainWnd = &dlg;
	int nResponse = dlg.DoModal();
	if (nResponse == IDOK)
	{

	}
	else if (nResponse == IDCANCEL)
	{

	}
	return TRUE;
}

int CPrgUIThread::ExitInstance()
{
	// TODO:  perform any per-thread cleanup here
	return CWinThread::ExitInstance();
}

BEGIN_MESSAGE_MAP(CPrgUIThread, CWinThread)
	//{{AFX_MSG_MAP(CPrgUIThread)
		// NOTE - the ClassWizard will add and remove mapping macros here.
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CPrgUIThread message handlers
